package com.yc.anno;

import java.lang.annotation.*;

/**
 * Company 源辰信息
 *
 * @author navy
 * @date 2024/7/30
 * Email haijunzhou@hnit.edu.cn
 */
@Target(value = {ElementType.TYPE, ElementType.FIELD,ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Inherited
public @interface MyAnno {
    public String name() default "abc";

    public int value() default 100;  // 默认属性

    public String[] items() default {};

    public int number() default 200;
}

@MyAnno(100)
class A{

    @MyAnno(value=100, name="张三",items="张三")
    int a;

    @MyAnno(items={"张三","李四"})
    void hello(){}

}

class B extends A{

}

